package com.doubi.common.config.mybatis;

import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.logging.Log;

/**
 * @author MrDoubi
 * 用日志输出
 */
@Slf4j
public class StdOutImpl implements Log {

  public StdOutImpl(String clazz) {
    // Do Nothing
  }

  @Override
  public boolean isDebugEnabled() {
    return true;
  }

  @Override
  public boolean isTraceEnabled() {
    return true;
  }

  @Override
  public void error(String s, Throwable e) {
    log.error(s,e);
  }

  @Override
  public void error(String s) {
    log.error(s);
  }

  @Override
  public void debug(String s) {
    log.info(s);
  }

  @Override
  public void trace(String s) {
    log.info(s);
  }

  @Override
  public void warn(String s) {
    log.warn(s);
  }
}
